# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit webapp

MY_P=${P/-/_}
DESCRIPTION="COWS Ajax is a cross-site, asynchronous, tri-directional communication framework."
HOMEPAGE="http://cows-ajax.sf.net/"
SRC_URI="mirror://sourceforge/cows-ajax/${MY_P}.zip"

LICENSE="GPL-2"
WEBAPP_MANUAL_SLOT="yes" 
#SLOT=""
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

src_install() {
local docs="MAINTAINERS.txt LICENSE.txt INSTALL.txt CHANGELOG.txt"
webapp_src_preinst
einfo "Installing docs"
dodoc ${docs}
for doc in ${docs} INSTALL; do
rm -f ${doc}
done
einfo "Copying main files"
cp -r . ${D}/${MY_HTDOCSDIR}
# we install the .htaccess file to enable support for clean URLs
cp .htaccess ${D}/${MY_HTDOCSDIR}
# create the files upload directory
mkdir ${D}/${MY_HTDOCSDIR}/files
webapp_serverowned ${MY_HTDOCSDIR}/files
#All files must be owned by server
for x in `find . -type f -print` ; do
webapp_serverowned ${MY_HTDOCSDIR}/$x
done
webapp_configfile ${MY_HTDOCSDIR}/sites/default/settings.php
webapp_postinst_txt en ${FILESDIR}/postinstall-en-4.6.3.txt
webapp_src_install
}


